import request from '@/utils/axios'

export default {
    // 发布商品
    publish: (data) => request({
        url: 'jstx.shop/publish',
        method: 'post',
        data
    }),
    // 商品列表
    shopList: (data) => request({
        url: 'jstx.shop/list',
        method: 'post',
        data
    }),
    // 商品详情
    detail: (data) => request({
        url: 'jstx.shop/detail',
        method: 'post',
        data
    }),
    // 发布/修改商铺信息
    publishShop: (data) => request({
        url: 'jstx.shop/publishShop',
        method: 'post',
        data
    }),
    // 我的商铺信息
    shopInfo: (data) => request({
        url: 'jstx.shop/shop_info',
        method: 'post',
        data
    }),

    // 收藏列表
    favoriteList: (data) => request({
        url: 'jstx.shop/favorite_list',
        method: 'post',
        data
    }),
    // 收藏商品
    favorite: (data) => request({
        url: 'jstx.shop/favorite',
        method: 'post',
        data
    }),
    // 取消收藏商品
    unfavorite: (data) => request({
        url: 'jstx.shop/unfavorite',
        method: 'post',
        data
    }),
    // 关注商户
    follow: (data) => request({
        url: 'jstx.shop/follow',
        method: 'post',
        data
    }),
    // 取消关注商户
    unfollow: (data) => request({
        url: 'jstx.shop/unfollow',
        method: 'post',
        data
    }),
    // 删除商品
    delete: (data) => request({
        url: 'jstx.shop/delete',
        method: 'post',
        data
    }),
    // 取消订单
    cancelOrder: (data) => request({
        url: 'jstx.shop/cancelOrder',
        method: 'post',
        data
    }),
    // 确认发货
    confirmShipment: (data) => request({
        url: 'jstx.shop/confirmShipment',
        method: 'post',
        data
    }),


    // 创建订单
    createOrder: (data) => request({
        url: 'jstx.shop/createOrder',
        method: 'post',
        data
    }),
    // 订单详情
    orderDetail: (data) => request({
        url: 'jstx.shop/orderDetail',
        method: 'post',
        data
    }),
    // 订单列表
    orderList: (data) => request({
        url: 'jstx.shop/orderList',
        method: 'post',
        data
    }),
    // 申请订单退款
    applyRefund: (data) => request({
        url: 'jstx.shop/applyRefund',
        method: 'post',
        data
    }),
    // 退款详情
    refundDetail: (data) => request({
        url: 'jstx.shop/refundDetail',
        method: 'post',
        data
    })
}